﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WCFContracts;
using TrainingWorkshop.IDAL;

namespace WCFServices
{
    /// <summary>
    /// Author:Sissi-Zeng
    /// Date:2012-8-28 20:00
    /// Class ProjectBService provides a set of services to client.
    /// In this part, ProjectBService implements all methods in ICourseBU,which is a service contract
    public partial class ProjectBService:IProjectBService
    {
        /// <summary>
        /// Tell factory to update a course
        /// </summary>
        /// <param name="courseToUpdate">Course to update</param>
        /// <returns>success or fail of update operation</returns>
        public int UpdateCourse(TrainingWorkshop.Model.Course courseToUpdate)
        {
            ICourseRepository courseRep = factory.CreateCourseRepository();
            return courseRep.UpdateCourse(courseToUpdate);
        }
    }
}
